# Contributor: Adam Jensen <adam@acj.sh>
# Maintainer: Adam Jensen <adam@acj.sh>
pkgname=dssim
pkgver=3.2.4
pkgrel=0
pkgdesc="Tool for image similarity comparison, simulating human perception"
url="https://kornel.ski/dssim"
# arm* / ppc64le: Tries to compile mozjpeg-sys with 'with_simd'
# s390x: incompatible with load_image crate
arch="all !s390x !ppc64le !armv7 !armhf"
license="AGPL-3.0-only"
makedepends="cargo cargo-auditable"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/kornelski/dssim/archive/$pkgver.tar.gz"

build() {
	cargo auditable build --release
}

check() {
	cargo test --release
}

package() {
	install -Dm755 "target/release/dssim" "$pkgdir/usr/bin/dssim"
}

sha512sums="
688f613e719c3c0cf61958144dbfbe050c2b2acc2d9baa2385ee45ea6a59c436711426bc9aa9a14c24950494af9f713da65c2296318ab3c888a56670940b8b29  dssim-3.2.4.tar.gz
"
